<template>
  <div>
    <good-list :dataList="goodList"></good-list>
  </div>
</template>

<script>
  // 引入商品列表组件
  import goodList from "./goodList";

  export default {
    name: "testGoodList",
    components: {goodList},
    data() {
      return {
        goodList: []
      }
    },
    mounted() {
      this.$axios.get('/goodList').then(res => {
        console.log('goodList:', res.data.goodList);
        this.goodList = res.data.goodList;
      });
    }
  }
</script>

<style scoped>

</style>
